My question will use emails as an example, but this could apply to anything.
Normally before registering a new user (including inserting his/her email) I check
Use
INSERT IGNORE INTO Users VALUES(...);
with a unique key on email field, then check row count with mysql_affected_rows();
This will result in a single query to the DB and rule out the race condition of the time window between SELECT and INSERT