UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gdxS11CINzpH/RylR7gDW6EAzNzUIriknmiqNxAOXgY='
WHERE
key_id = '74c9c838dba1a4df430c26e293f9db5b6e5be02aa160b6303f0f5a270ddb88b6'
AND (
token = 'gdxS11CINzpH/RylR7gDW6EAzNzUIriknmiqNxAOXgY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)