def METHOD_NAME(self) -> None:
    self.token = str(uuid.uuid4())
    TOKEN_PATH.mkdir(exist_ok=True)
    with fasteners.InterProcessLock(str(self._token_file) + ".lck"):
        assert not self._token_file.is_file()
        self._token_file.write_text(json.dumps({"state": "new"}))