Now I\'ve found a lot of similar SO questions including an old one of mine, but what I\'m trying to do is get any record older than 30 days but my table field is unix_timest
How about
SELECT * from profiles WHERE last_login < VALUEOFUNIXTIME30DAYSAGO
or
SELECT * from profiles WHERE last_login < (extract(epoch from now())-2592000)
Have a look at this post:
https://dba.stackexchange.com/questions/2796/how-do-i-get-the-current-unix-timestamp-from-postgresql
and this
http://www.epochconverter.com/