mktime() ma puoi prelevare direttamente la data/ora dal db in formato unix timestamp.

select *, UNIX_TIMESTAMP(campo) as unixtime from .....