UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'myH5lqN3OpxcKTmzQPH3Ok3qebDrACIt/6zl7m8ooWg='
WHERE
key_id = '68d482d81790197ca34c5bb9fe83b4f08a8bedf78f1cdc912257465ae1b4d366'
AND (
token = 'myH5lqN3OpxcKTmzQPH3Ok3qebDrACIt/6zl7m8ooWg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)