Try doing this with MySQL scheduling:
DELIMITER $$
CREATE EVENT deactivation
ON SCHEDULE EVERY 10 MINUTE STARTS CURRENT_TIMESTAMP
DO
BEGIN
UPDATE tbl SET tbl.active = FALSE
WHERE tbl.active = TRUE AND
( TIME_TO_SEC( TIMEDIFF (NOW(),tbl.updated) ) / 60 ) > 10;
END;
$$;
Where tbl.updated
is your timestamp (generated with php). As my testbox is unreachable atm,
Im not sure if this query is correct, but generally, it should do the job.