UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1cszCY0OrDwjeUeleyt4pdmc1LNP3/TMFV8yZ9xESto='
WHERE
key_id = '6fe4971d4697b764109bd64986b8b3754b8b1bfaf637affbabe467644b8b0300'
AND (
token = '1cszCY0OrDwjeUeleyt4pdmc1LNP3/TMFV8yZ9xESto='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)