$db->query(\"SELECT * FROM \".DB_PREFIX.\"users WHERE uid=\'\".$uid_id.\"\' AND login=\'ExpressCheckoutUser\'\"); if ($db->moveNext())
Considering your last edit which says
uid is set to primary by pinnaclecart. so wouldnt it be 'dangerous' to set it to be unique instead?
In this case, don't do that. And don't do anything at all, PRIMARY KEY is UNIQUE by default, so it can not be duplicated.
PRIMARY KEY
UNIQUE