No not really. As in your previous question, you can try and remove the key from memory using a timer. Even then, as long as a language/runtime does not support low level or secured memory accesss, some parts or all of the key may remain in memory. This is especially an issue for private keys, of course.
So you need to use a timer or a separate process to handle expiration of keys. Even then, it may be advisable to restart your process to wipe the key from memory and to sufficiently protect your swap file.