Josh, there are a couple of things that could have been in the spray you saw coming out of the hole on top of the shell, and neither one of them is anything to worry about.
In order to explain it, I have to give you a little background. Like other snails, these animals are twisted around during development in a process called
torsion (there is more info and pictures
here if you're interested). This process basically involves one side of the baby snail growing much faster than the other such that the body is twisted around 180 degrees counter-clockwise such that the anus moves into a position directly over the head (making all snails poop-heads ;) ). Different animals deal with this in different ways, but the keyhole limpets use that hole in the top of their shell as a little poop volcano, and eject their wastes through it. They also do the same thing when spawning, so the eruption of clear fluid that you saw could easily have been feces, or gametes.
The other possibility is that the animal was startled when you suddenly shone the light on it, and clamped down hard on the rock, forcing water trapped under the shell (and some debris/detritus that is inevitably trapped beneath it) to be ejected from the hole in the top of the shell.
In either case, it is a harmless part of their normal behaviour and nothing to really worry about.
Rob