code: def renew_session(self):
          
          if ((not 'user_uid' in self.cookieInterface.cookies) or self.cookieInterface.cookies['user_uid']!=self.session_uid) and (not self.expired):
              self.on_session_expired()
  
          if self.expired:
              self.session_uid = str(random.randint(1,999999999))
          
          self.cookieInterface.set_cookie('user_uid', self.session_uid, str(self.session_timeout_seconds))
  
          #here we renew the internal timeout timer
          if self.timeout_timer:
              self.timeout_timer.cancel()
          self.timeout_timer = threading.Timer(self.session_timeout_seconds, self.on_session_expired)
          self.expired = False
          self.timeout_timer.start()
docs: Have to be called on user actions to check and renew session