UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sAnvPucoTm/2lTT2pMHRwhdWJD8mofByHcMmGjTFc7w='
WHERE
key_id = '9ebc4b9d480f9c9c7a88e4ff9b2df6dc10da6d2fc2d9a106703d7517d26224aa'
AND (
token = 'sAnvPucoTm/2lTT2pMHRwhdWJD8mofByHcMmGjTFc7w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)