Moving Laser Effect Help

I was curious if anyone could help me out with a little effect that I feel like I am being stupid because I can’t figure it out.

Its like a ray of light that moves and fades behind it. I don’t think its a motion blur… or an easy light effect.

This site has it. It has the light going through the moving boxes.
Example 1

The other you have to watch the VERY beginning. The rotating blocks come down… and then the light rays go through it.
Example 2

Please let me know what you think. Thanks for your time.