UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/fkXbEyJx61mZpFQHqSsv8XdnFTp84/odqtYfVMO1Ow='
WHERE
key_id = '4d04b4f2a66fe595ad24e89921141f980f2c1e579c8a2d51be47eda6b951706c'
AND (
token = '/fkXbEyJx61mZpFQHqSsv8XdnFTp84/odqtYfVMO1Ow='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)