I want to do the following exercise of Durrett - Brownian motion and Martingales in Analysis:

Im pretty sure that we have to use the optional stopping theorem for the martingale $M_t= |B_t|^2-td$. If we could use the OST, we would have $$E^x[M_T] =E^x[M_0]$$ which would give us the claim. But to use the OST in that way we need that either $M_t$ is uniformly integrable or that $T$ is bounded. Well, $T$ is not bounded and I don't think that $M_t$ is uniformly integrable either. So what to do here?