No, STDs are not transmitted by hand jobs, even if there were fluids on your hand before you touched yourself. There is too much exposure to air and movement for that to happen.
You will not get herpes or any std from giving a hand job. This is no risk of anything.