$seconds = mktime(<the date from the database>) - mktime();
[man]mktime/man generates the timestamp of your date in the future when you feed in the details from the database.
Alternatively, do the whole thing in SQL:
select (UNIX_TIMESTAMP(date) - UNIX_TIMESTAMP(NOW())) as seconds_until_date from table