UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fYv8RIql9OzKQCxp2OrtEgDXOmPBUU1c82EA8xI4PzQ='
WHERE
key_id = '69e9770f8f76d1a2c791fa74356b3795c476f2771a65d1ed2d6f95e93d5e13ac'
AND (
token = 'fYv8RIql9OzKQCxp2OrtEgDXOmPBUU1c82EA8xI4PzQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)