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
Unless I've missed something, this should be pretty easy:
SELECT * FROM profiles WHERE last_login < NOW() - INTERVAL '30 days';