Firstly they are not Gotoh 310's - they are Gotoh 301's.
Looking at the spec drawings of the SG 301's and SGV510's the distance from the center of the string shaft to the center of the locating screw hole are identical (10.5mm) - same washer and nut size too - should be a simple straight swap.
I notice the locating screws are the same length but those supplied with the 510's is just slightly fatter near the top - 2.1mm vs 2.4mm - I'd re-use the ones that came out because you know they already fit.