UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cMZiuBel/CmPp8ONVy8rwBlEW8v+WU7XW5Sxo7N99PM='
WHERE
key_id = '63ebb22e295bfdbbbeee605be0af2e5db03a1fa0c9fae7730cbfbebcdaa620a2'
AND (
token = 'cMZiuBel/CmPp8ONVy8rwBlEW8v+WU7XW5Sxo7N99PM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)