public function findUserByValidRefreshToken($token)
    {
        /** @var BaseUser $user */
        $user = $this->findOneBy(['refreshToken' => $token]);

        if (!empty($user) && $user->isRefreshTokenValid()) {
            return $user;
        }

        return null;
    }