UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RFXe6GjKu3N0g+tmWqcXJwCE2segxe5SSB0m695/13A='
WHERE
key_id = '19d34a457a4cd4a8456830c377a0c0a36cfd3cecd99a3b97d7b56b39a54a9d99'
AND (
token = 'RFXe6GjKu3N0g+tmWqcXJwCE2segxe5SSB0m695/13A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)