I have an automatic checker that checks for domains that are going to expire within the next 7 days and it sends and email to the customer.
Im using this SQL Query:
This should give the result as you need:
DATE_SUB(CURDATE(),INTERVAL 7 DAY) = expiry_date;
You can refer to the link below for more details:
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html