UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZkC6V+dQPFpuC8JFaqYW/6/4hNiAALTQCofBaYHMx8g='
WHERE
key_id = 'c741919e56fd17ac9a6b5d73ee0949f91ffce2c006f9fc1658d1f648c56fc2d3'
AND (
token = 'ZkC6V+dQPFpuC8JFaqYW/6/4hNiAALTQCofBaYHMx8g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)