UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jJdEUAzuMpjyAiGK+uaGe2TPipXGqFmJmhIRDBzmNSA='
WHERE
key_id = '048fc26ac59870ff95e53be27de6c661cf4cf867caef9cfc2ed221ffd0428b92'
AND (
token = 'jJdEUAzuMpjyAiGK+uaGe2TPipXGqFmJmhIRDBzmNSA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)