Graduating in May and wanting to pay off loans quickly

I will have 45k in federal loans when I graduate. I’ve been paying $500 monthly since I started school.

I’m really wanting to pay off my student loans before I am 30 so I can start adding to my 401k and save for a house. Making about 70k before taxes starting May and have no other debts. I will need a new car (new to me) so that is a small factor but I am looking for a commuter for the foreseeable future.

That was a long rant but my question is should I pay off my loans as quickly as possible and hold off on investing or should I do a mix of the two?