UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Td/qZQsGAwGb09H3Ryz+55Bly8PYpJXo7kQq/EMWbAU='
WHERE
key_id = 'dbe0f11b62e1bc4339727522bf6cff44f0885e9b037f6d4b5316a9f0e939f951'
AND (
token = 'Td/qZQsGAwGb09H3Ryz+55Bly8PYpJXo7kQq/EMWbAU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)