You have to be aware of everything around you, while dedicating yourself to a certain task, so that nothing goes wrong.
Cats are clever animals, in a blink of an eye they would quickly eat your fish!
So the idiom is a kind of warning against the Murphy's law. So be careful, keep awake and prepare for a fast response just in case it is needed.