uhhggg I hate timestamps. makes things more difficult to chekc like you are doing.

you could try to compare it to the current timestamp on the box. this is one way of doing it.

PHP Code:
// this will get the current time form the server and then make it 
//so it looks 30 days old. then you will need to get the timestamp
// form the DB and convert it as well.

$dy =  date("d");
  
$mn =  date("m");
  
$yr date("Y");
  
$lat 30;  
  
$expiredate strftime("%Y.%m.%d"mktime(0,0,0,$mn,$dy-$lat,$yr));

//then after you get the time form the DB and convert it
// you can compare the 2, if equal then you do what you wanted to.