UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ryjh5FE07P7g8fn7yEoIJpu6RmYHk2tr3c8qxTpFhJ4='
WHERE
key_id = '5ca4d65570ea38644e5f443d22f2488b11c6d73d073799d01db554a94c4038f2'
AND (
token = 'Ryjh5FE07P7g8fn7yEoIJpu6RmYHk2tr3c8qxTpFhJ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)