i haven't tried it, but something like the below should work:
create table user (id int auto_increment primary key, active enum('Y','N'),username varchar(255), password varchar(255), last_account_access timestamp)
UPDATE user SET active = 'N' WHERE NOW() > DATE_ADD(last_account_access, INTERVAL 3 MONTH);