SSH public keys are used only for connection establishment. They also have no expiration date attached (unlike SSL and PGP keys), and so cannot 'expire after a certain time period'; even if they did, since they're only used for the initial connection, this would not terminate the connection.
There is a concept of a 'key re-exchange' in SSH, in which the ephemeral shared secret keys (NOT public keys) are cycled periodically. However this happens after a long time period (about once an hour) or after a large amount of data (about once every gigabyte of data transferred) is transferred, and both OpenSSHd and PuTTy handle this re-exchange just fine, so it's unlikely to be the cause of your problems.
If your ssh connection is terminating after a certain amount of time of inactivity, and you are connecting through a typical home router, your home router may be terminating the inactive connection. You can fix this by forcing SSH to send periodic keepalives. Add this to your sshd_config:
ClientAliveInterval 30
This will instruct the server to ping the client after 30 seconds of inactivity; this will suffice to keep the connection active in the router as well.
You can also configure this on the client side, by adding to your ~/.ssh/config:
ServerAliveInterval 30