use the download link as your solution..
start with inserting time in the database,
as soon as the person clicks the link, time and expiry date will be inserted in your mysql database..
(start date) (end date)
INSERT INTO db VALUES (timestamp, timestamp + 2 days)
Hope...