UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yFVP/Wjl4AHXYKW1GlQF/HdRZQEFga9Y9NWS9P/qKuQ='
WHERE
key_id = '4b1b62e45c279cc48555d6aee49fe92c320fbda4fefe6ca1dad637fbb35fc381'
AND (
token = 'yFVP/Wjl4AHXYKW1GlQF/HdRZQEFga9Y9NWS9P/qKuQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)