I think there is some confusion here. Photons are always massless. They also always move at the speed of light. Therefore every example of a photon in nature has zero mass.
Perhaps you are thinking about a photon moving through a medium other than a vacuum. In this case, we can view the photon plus the interactions with the medium as a quasiparticle with a nonzero mass and a speed slightly less than the speed of light. But then we are no longer considering a true photon, so there is no contradiction with the first paragraph.
Edit:
To answer your comment, in special relativity the energy of a particle is
$$E\equiv\gamma mc^2$$
where
$$\gamma \equiv \frac{1}{\sqrt{1-v^2/c^2}}$$
When we plug $v=c$ and $m=0$ into the formula for the energy, we find that $\gamma$ goes to $\infty$. Therefore, this expression for $E$ is an indeterminate form, so it should seem reasonable that any particle with zero mass moving at the speed of light can have a finite energy.
Perhaps a more useful formula for the energy in this situation is
$$E^2=p^2c^2+m^2c^4$$
where
$$p\equiv\gamma m v$$
is the definition of momentum in special relativity. You can derive this formula using the definitions of energy and momentum in special relativity. From this formula, you can see that the energy of a massless particle is finite and proportional to its momentum.
Perhaps some of your confusion results from trying to use the nonrelativistic formulas for energy and momentum to understand the behavior of highly relativistic light.