inside SNAP you can define a valid pixel expression on the properties of the phase band:
coherence > 0.3
for example. Of course, coherence should be replaced by the actual name of the band.
A more permanent solution is presented here: Is it the right way to create mask for phase unwrapping?