Current limiter using pnp transistor
The circuit looks good with two recommended additions:  First, you probably need a diode across your relay coil.  Otherwise, the voltage on the Q6 drain-to-source will exceed its 50-volt rating when Q6 is turned off, and Q6 will break down and have to absorb the coil energy.  I would also place a diode across the collector to emitter of Q3.  If you don't, and your power supply is suddenly shut down to ground, you will have a potential reverse voltage of 40 volts across Q3 collector-to-emitter from the charge on the 47-uf capacitor.  Both diodes are reverse-biased in normal operation, so choose the reverse voltage rating accordingly.  Good luck!