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