Downconvert high voltage to match dry contact rating
When you switch a circuit involving 230 VDC the contact voltage when open circuit will be 230 VDC, which is greatly in excess of 30 VDC.  

Contact voltage rating must be >= the voltage that will appear across the contacts when open circuit. 

If you are using 230 VAC mains as the source of HV DC and rectifying it then Vdc will usually be around 1.414 x V_AC_RMS = 230 x 1.414 ~= 325 VDC.
Your resistor will need adjusting accordingly.
eg (325-24)/20 mA = 15k

Dissipation in a series resistor = V x I
= 206V x 20 mA = 4.12W in the 230 VDC case or
= 301V x 20 mA = 6W in the 325 VDC case
A 10 W rated resistor is required at minimum in the 4W case and > 10W rated ideally in the 6W case.
The resistor MUST be rated for at least the full DC voltage used, regardless of power rating and any other losses.  

IF AC is used as the 230 V source power dissipation can be greatly reduced by using a series capacitor to drop most of the voltage. Numerous capacitor dropper supply examples are available.

Use of HV DC in the manner you describe MAY make sense in some cases, but use of a transformer r similar to provide a low voltage supply usually will make more sense.