UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '80AUjqAipiRIM/5Gxomuj5FjOTTl9pdXSvl4olrn9wQ='
WHERE
key_id = '5f29b9917f97a6aaa22d4d45fc4875eef232db08c26342508e98011e55a77e08'
AND (
token = '80AUjqAipiRIM/5Gxomuj5FjOTTl9pdXSvl4olrn9wQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)