Multiple processes don't really enter into your question.
If it's safe to do A (your script's work) and B (delete
old files) sequentially, it's also safe to do A and B
simultaneously. (OK, race conditions could enter into it,
but I'm assuming that you won't be using an expired config
file while doing actual work.) While there are definitely
security issues that need to be addressed,
forking doesn't add any new ones.
That said, the previous responses were correct: Use cron or
an equivalent instead of making your CGI do things unrelated
to servicing the current request.