Drive relay when "key" is connected
Just looking at your circuit I see a number of problems. The first big one is that your "smoothing circuit" is not performing anything at all like you think. The 555 output is shorted to the base of the transistor and when this output tries to go high current flow is not limited and as such you will soon destroy either the transistor or the 555 chip. To have the "smoothing" circuit actually do anything you will have to add a resistor and a diode in line with the 555 output. The RC time constant of this added resistor and the 470uF capacitor will filter the AC output of the 555 and this determine how long the "key" has to be attached before the relay activates. It may be necessary to also increase the value of the R3 100 ohm resistor so that it is similar in value to the inline resistor that you add. 

The next thing that needs work is how you have the relay coil connected. You should toss the R4 resistor and place the relay coil connections in between the +5V and the collector of the transistor. 

Finally there needs to be a diode installed across the relay coil so that the high voltage spike created when the transistor goes off does not kill the transistor.



Finally consideration needs to be made as to how special the "key" really needs to be. Please do realize that the relay will only stay energized whilst the key is installed. In addition, as long as the added resistor and diode are part of the base circuit as they should be, the "key" could be substituted with a short piece of wire between the signals that allow the key to connect to the base circuit. Is this "secure" enough?