In high voltage but low current measurement
20 microamperes is quite low, combined with high voltage... I would add a resistor and measure the voltage on it(Ohm's law) example if you have a 100k resistor, the voltage of it will be 2V when your current is 20 microamperes. So you can make a circuit that triggers with 2V and getting a resistor rated for 40kV could be expensive, I still think it is the best solution. (even if it is unlikely you will apply the 40kV to it, it is better if it is rated for it)

The switch will be a whole other issue that you need to solve on your own, it is not easy to open 40kV, you need to do a lot of research on that end.

edit: try to post a schematic of your circuit if you can, with these kinds of voltages you want to avoid contact with it as much as you can, seeing the schematic maybe there is a method to avoid contact with the 40kV entirely. 

you might think the comments are over doing it, but even if you are certain of everything you are doing it is not dumb to remind you that this is deadly. Be careful.