UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/CeyC+baZVt0UzLcoVWF2DH1/m0G0lUUQBaBgVokxqQ='
WHERE
key_id = '659870a40d3610494845566cd576559339534cac8c7adf2960edcb3554e4ed38'
AND (
token = '/CeyC+baZVt0UzLcoVWF2DH1/m0G0lUUQBaBgVokxqQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)