[DATABASE] Ensure values passed to IN or NOT IN are unique

No need to get duplicates values in a WHERE ... IN or a WHERE ... NOT IN