UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M2rprDBhFLNOMQwWNeI63JT2ATBFmAr8e7u5mT7O/5A='
WHERE
key_id = '7d7fb48fdbc677ebf806906601eb59df59542761d1c55a98d4960dcaadc1ac68'
AND (
token = 'M2rprDBhFLNOMQwWNeI63JT2ATBFmAr8e7u5mT7O/5A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)