UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GVmFEe0AkFcreM0py58Lf4ItzBWL4KX9rZdXdCrNeRY='
WHERE
key_id = '64274e154fa6ed310ad14191c98d9623921e40eed3327032f0f3cb626e600e0f'
AND (
token = 'GVmFEe0AkFcreM0py58Lf4ItzBWL4KX9rZdXdCrNeRY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)