Unless the second version has Q in litres per second ie kg per second, which is a version hydraulic engineers use.
They will also use g as 10 instead of 9.81, because it is "close enough" when the actual power is estimated using an efficiency of 50%
This assumes the water density is 1000kg/m^3 - worked with hydraulic engineers on small hydro and it is a quick ball-park calculation for the estimated power output.
Edit: So replacing g with 10 using the example figures you just added will give 30kW, then at 50% efficiency that is 15kW - close enough to get a reality check.
Given that the river flow rate is estimated using pooh sticks and a measurement of the cross-sectional area it will be good enough.
Often a lot of effort is put into making a V-notch weir on the smaller rivers as the next step in improving the estimation.
A friend put a small turbine in on a river to produce 1kW, great care was taken to get all the flow and keep the water clean ie no sticks or leaves. As it was 500m from the house we also upped the voltage to 600V from the 230V AC and dropped it back at the house - reducing cable size and cost.