I have one of those cheap remote controll outlets, and I want to use them about 30-40 m apart. I've tested them at that range, and they were very unreliable. Is there some way to improve the range?
Not reliably..... it may be possible to add an external antenna to them but this would make them 'ugly' and you'd have to dismantle them to access the electronics - and given the live voltages present in the device I wouldn't recommend you do this.
Similarly you might be able to increase the transmit power but that encroaches on legalities that we don't encourage.
If you are referring to the keypod type 433mhz then there is already a longer range unit available. They make all sorts of claims but I tried one at 200m over reasonably open ground with no problems. Larger physical size though obviously.