Or, you can simply do an INSERT IGNORE ...
(no need for a unique constraint as it's the primary key, and hence by construction must be unique)
From MySQL Reference Manual:
If you use the IGNORE keyword, errors that occur while executing the INSERT statement are ignored. For example, without IGNORE, a row that duplicates an existing UNIQUE index or PRIMARY KEY value in the table causes a duplicate-key error and the statement is aborted. With IGNORE, the row still is not inserted, but no error occurs. Ignored errors may generate warnings instead, although duplicate-key errors do not.
Note that if you had other columns in your table you'd want to update each time (e.g. a "last used" timestamp), you could also use INSERT ... ON DUPLICATE KEY UPDATE ...