Is it possible to get the current UNIX timestamp with sql?
Try UNIX_TIMESTAMP():
SELECT UNIX_TIMESTAMP();