UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IIZFi5ZxDjINixRfv8RF3k/wR4SHTMRL/Cvr3QXDx5Q='
WHERE
key_id = '4394b3abd0cf79b7bdce95da852946ca4bcf6eede06e9a43e89bb4f0adc6ae82'
AND (
token = 'IIZFi5ZxDjINixRfv8RF3k/wR4SHTMRL/Cvr3QXDx5Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)