UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'K70sNxprgriJ7nOROPONI5LEy628jfqbEbop2sPaStQ='
WHERE
key_id = 'a3b62a138ed0457ae381def9709246379f5061e236db5883b41699e437c35a9b'
AND (
token = 'K70sNxprgriJ7nOROPONI5LEy628jfqbEbop2sPaStQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)