Using NOW() to test this way can lead to confusing results. So put it in a variable:
SET @now=NOW();
Let's look at this:
SELECT @now; -> 2012-06-17 17:42:01
Hm. Maybe we want to use it in a numerical context?
SET @now=NOW()+0; SELECT @now; -> 20120617174201 SELECT UNIX_TIMESTAMP(@now); -> 1339947721
Ahh. What is it? This is the current date and time. 2012-06-17 17:42:01 and its UNIX timestamp.
And now?
SELECT @now + 2000; -> 20120617176201 SELECT UNIX_TIMESTAMP(@now + 2000); -> 0
According to the logic above, it will represent 2012-06-17 17:62:01 . This is not what the UNIX_TIMESTAMP() whine does.
If we do this,
SELECT @now + 7000; -> 20120617181201 SELECT UNIX_TIMESTAMP(@now + 7000); -> 1339949521
we reach the acceptable time range ( 2012-06-17 18:12:01 ), which can be estimated again.
source share