this is probably caused by the session garbage collection. If the session file's access time is more than a certain # of seconds ago (php.ini defaults to 1440 which is 24 minutes) then the garbage collector starts wiping out sessions. I've come across this myself recently.
What you need to do is check for the session ID (either in a cookie or in the URL) and then call session_start.
See if you can get any data out of $_SESSION. If you can, then the sesion is probably fine. If not, then the session hasn't really expired, because you've just re-initialized it, but the data is gone.
As for re-initializing the session, that all depends on the data stored in it. If that data was based on user interaction and not from a database query, you may have to force the user to do whatever they were doing over again. If it was just populated with info from a database, like the user's details, just run your query again.
if ( isset($_COOKIE['PHPSESSID']){
session_start();
if ( isset($_SESSION['timestamp']) ){
//session is fine
} else {
//re-initialize session
}//end if
}//end if