UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3+MQT/ovYXYR/ff0Usn5HG1IPp+fET3Hu6csMIFQZTQ='
WHERE
key_id = 'df27395033a85abf5ffca4dc847a24a3ec774432af1265f9ed5bf1e260f3614f'
AND (
token = '3+MQT/ovYXYR/ff0Usn5HG1IPp+fET3Hu6csMIFQZTQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)