To me, it appears as though the ticks take longer in the moving clock compared to an identical photon clock standing still right next to me, which ticks at a normal rate.
Some other guy, who is riding with the moving clock would see it ticking at the normal rate, and quite bizarrely, will see my clock ticking slower.
This effect is the time dilation of Einstein’s Special Relativity.
Now, what if the clock is travelling at the speed of light?
The apparent distance that the photon needs to travel to reach the top mirror becomes larger and larger as the clock speed increases. And the distance is infinite when the clock reaches the speed of light.
From our point of view, the photon clock could never complete a tick. Time is frozen.
Similar arguments will show that a photon clock in an accelerating frame will also tick slower compared to a non-accelerating clock.
The overall distance the photon has to travel is larger in an accelerating frame.
But Einstein’s Equivalence Principle tells us that the frame in a gravitational field is indistinguishable from an accelerating frame.