UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RZuNh7MlYiZ3kgtHNk8H9s+8QwVKwHGE1gkc4G95uSY='
WHERE
key_id = '175444f9dcd0ccaf5c42147e2b3e27d0ab7083f2caddf6024e87d31ca1cd78e5'
AND (
token = 'RZuNh7MlYiZ3kgtHNk8H9s+8QwVKwHGE1gkc4G95uSY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)