code: public function isValid($key, $token, $delete = false)
      {
          $getToken = $this->get($key);
  
          if ($delete === true) {
              $this->delete($key);
          }
  
          if ($getToken === $token) {
              return true;
          }
  
          return false;
      }
docs: @param      $key
  @param      $token
  @param bool $delete
  
  @return bool