UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iJeCIPYvCaLASo8S21PSXkExUTUO96JfkwLSVadW2PE='
WHERE
key_id = '9fd06f6246285e6662021a9aeb2b9c894b7933ce2b44eff02271331701efd4f8'
AND (
token = 'iJeCIPYvCaLASo8S21PSXkExUTUO96JfkwLSVadW2PE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)