UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1l26OFX4etCK5dmRN63p5UfVzeBhYEsZ0ZZkVLYtm94='
WHERE
key_id = '1ee485984d7ddb42d60459039c81956ad04f3b19e7a7111727619dad53d4ecab'
AND (
token = '1l26OFX4etCK5dmRN63p5UfVzeBhYEsZ0ZZkVLYtm94='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)