UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2OgMxNl6rpgx76MrNHZKiNT9nSdSRVNvzrmrQR5THXk='
WHERE
key_id = 'e376698eb0f4f20e34788e6d07b5684361e8c139b26620ff1e3440cb58b458fd'
AND (
token = '2OgMxNl6rpgx76MrNHZKiNT9nSdSRVNvzrmrQR5THXk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)