Well, if you have some members at your site, so that you know that the index.php will be loaded at least once a-day, you could let anonymous users do it.
Just add the code on top of the page, and each time it loads it will check if expirees exist and mail the users in question. You'll have to add a field to your member-db, though - so that the poor member don't recieves a mail each time the page loads after the time has expired 😃
If you add two SET-fields, you can call them warning_one and warning_two, and use them for control by setting them to y or n.
You'll probably want to check the mail-code closely to avoid misuse of the script.
Let your users do the work!
knutm 😉