first of all you have to change your session timeout for1 min = 60seconds like this
ini_set('session.gc_maxlifetime', 60);
now you can check the session value each time on your page when load. if activity not happen within 1 min session will expire and you went to logout like this
<?php
include('config.php');
session_start();
if(isset($_SESSION['myusername']))
{
$myusername=$_SESSION['myusername'];
$ses_sql=mysql_query("select nocname from nocusers where nocname='$myusername' LIMIT 1 ");
if($row=mysql_fetch_array($ses_sql))
{
$_SESSION['myusername'] = $row['nocname'];
}
else
{
// logout here
}
}
else
{
// logout here
}
?>
UPDATE 2:
you can also store a last activity time in your database respect to each user. and update it every time on top of each page. before it check that last updated time is less than 1 minute if yes it means no activity by this user greater than 1 minute. logout it.