UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LnY+A5gJzqvm7VX42X0NCxeaxObTWZOXFDLpag6jqxQ='
WHERE
key_id = '63acaf5a3b71a776a9821b2336b2d0ed4631e9828bd728f62bc0ec626cec1838'
AND (
token = 'LnY+A5gJzqvm7VX42X0NCxeaxObTWZOXFDLpag6jqxQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)