select UNIX_TIMESTAMP( CAST(from_unixtime(1371054641) as date) - interval -1 day) as addTime from DUAL;