Some networks have a Channel Service (ChanServ) that can retain channel keys, most that have a ChanServ do not retain the key nor any limit you may have set because of the way channel modes are saved. +k and +l require additional parameters (the key and the limit) that no other "mode" requires (excepting +obv and possibly +h - all those are handled differently with AOp lists, where available). Some networks offer only a very limited channel service and others offer no channel service at all. If your ChanServ doesn't support keeping track of +k keys (and you'll have to ask in #Help on that network) or there isn't any channel service at all, then your only alternative is to get a bot to put on your channel to keep they key in place when everyone is gone.
mIRC bots are good for this, though if you disconnect your computer, your channel will get empty and the key will disappear. Your mIRC bot can obviously rejoin the channel and reset the key if that happens, of course. Eggdrop bots are better for this, but quite a bit more difficult to set up. They require that you get a shell on another computer (usually a server that runs UNIX) and download the eggdrop files, untar them, compile the program and write the configuration files...and THEN you're ready to install any TCL scripts to do what you want that bot to do.