MySQL in Anope is a well documented feature.
As of 1.8.0-rc1:
MySQL can write TO the database at regular intervals. However, it updates everything at once, so if there are a large number of nickname or channel registrations it can take 2 or 3 minutes (or more) of services lag as it is all in the same thread.
MySQL can READ FROM the database AT START TIME.
Anope IRC Services CANNOT at this time perform the task you desire using the SQL feature, though it is planned for 1.9.
You may be interested in helping Rob with his XML-RPC module, which could probably be expanded to perform these functions while waiting for the 1.9 SQL Read/Write support.