Update just one unused row
Based on the idea that you want to update a single record that fits your criteria, but do not care which record that is, this will work for you:

UPDATE tbltokens 
SET status='Used', userid=1, serviceid=2 
WHERE status = 'Unused' AND userid IS NULL AND serviceid IS NULL
LIMIT 1;


Using LIMIT on an UPDATE query works the same as on a SELECT. It's detailed in the MySQL doc for UPDATE.

You should also use IS NULL instead of = NULL, as this is the correct syntax for checking NULL values.

Also string literals should be quoted with single quotes (like this: 'text') and not with double quotes so the code wil continue to work in different SQL modes (eg ANSI) where double quoted strings are identifiers and not constants.