UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mfsp3PDE07/Cr2UzgGaQscVs76Co2T9/YF4KqmigN6I='
WHERE
key_id = '4b0771fb0cfecf6432213497cf02fa35f1b384f73cb1e766369f2b87c58b99df'
AND (
token = 'mfsp3PDE07/Cr2UzgGaQscVs76Co2T9/YF4KqmigN6I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)