code: protected function isExpired(array $tokenData, $tokenValidity = null)
      {
          return time() >
              $tokenData['time'] + (($tokenValidity!==null) ? $tokenValidity : self::TOKEN_VALIDITY);
      }
docs: Checks token time validity
  @param array $tokenData
  @return bool true if token is expired (is after validity)