UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3CeWjE6vuePNQtz20R3ZExS12/kM1XQVfG+h9uIbwvM='
WHERE
key_id = 'c0bdcf6b4434b1e6dd3d58a9e6814637d8f4a57ad173bfd64435d348ac41eae4'
AND (
token = '3CeWjE6vuePNQtz20R3ZExS12/kM1XQVfG+h9uIbwvM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)