There are two ways to do this.
The first one is better. Contact the sysadmin for your web server and ask what Mail Transfer Agent you use and if they can forward mail to a script instead of a mailbox. I know that Sendmail and Postfix can do this. Other MTA's probably can too but I don't have any experience with them. When an email arrives, the MTA executes your PHP script which receives the email as input. You can parse the email looking for FROM and TO and BODY information, look up the actual address in MySQL, and send out a message. This is the better method because the script only runs as often as is necessary.
The other solution is to use cron to trigger a PHP script to run once a minute. That script uses the PHP functions for POP'ing mail from a mailbox. Those functions can read the mail, find the FROM, TO, and BODY information for each email, look up data from MySQL and send out an email. This method is less optimal because the script runs 60 times an hour all day long AND you have to program the script to loop through possibly multiple emails waiting in the mailbox AND mail could wait as long as 59 seconds before being handled which is an unnecessary delay. The first method is simpler (no looping necessary), doesn't put any unnecessary load on your server, and handles the mail the instant it arrives.
I guess a third way to do it would be to have a PHP script that edits your Postfix config files to add new forwarding aliases whenever a new alias is dynamically created. It's always a security risk to give PHP the power to write to such low level, root owned data... so this would need to be done with extreme care but the benefit of this method is that you take even more load off the server (you don't need to invoke PHP everytime an email arrives). It also has the benefit of leaving the email in its original form instead of trying to write a script that disects the incoming email and then reassembles it for outgoing which could corrupt attachments, screw up MIME types, alter text encoding, and probably other similarly tricky problems.