public OneTimeTokenAccount find(final String uid, final long id) {
        val query =
            List.of(
                DynamoDbQueryBuilder.builder()
                    .key(ColumnNames.USERID.getColumnName())
                    .attributeValue(List.of(AttributeValue.builder().s(uid.toLowerCase(Locale.ENGLISH)).build()))
                    .operator(ComparisonOperator.EQ)
                    .build(),
                DynamoDbQueryBuilder.builder()
                    .key(ColumnNames.ID.getColumnName())
                    .attributeValue(List.of(AttributeValue.builder().n(String.valueOf(id)).build()))
                    .operator(ComparisonOperator.EQ)
                    .build());
        val results = getRecordsByKeys(query);
        return results.isEmpty() ? null : results.iterator().next();
    }
Find.

@param uid the username
@param id  the id
@return the one time token account
support/cas-server-support-gauth-dynamodb/src/main/java/org/apereo/cas/gauth/credential/DynamoDbGoogleAuthenticatorTokenCredentialRepositoryFacilitator.java