A stochastic Datko-Pazy theorem