the skin on our hands is very thick and protects us from almost everything. yes indeed you could harbor hpv or molluscum under the finger nails to transmit to someone but the risk of that is incredibly small. Most std's are spread either through body fluids and the direct skin on skin contact of the sex act and need heat and friction to transmit. It's not likely at all that you'd contract any std from mutual masturbation. many, many thorough posts by HHH and Dr Hook on why not on their forum too for more reading.
grace