UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OfM8V9Ln7MOHNvD6Ral1IUl5LTcducvp2EguY7Sl87g='
WHERE
key_id = '5e26cde6b44ae3eeb3be7083d55cec5fdaf05c1f9dc520b9d9aa783b49f5c7ba'
AND (
token = 'OfM8V9Ln7MOHNvD6Ral1IUl5LTcducvp2EguY7Sl87g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)