When is it appropriate to bet post flop with an unimproved low pocket pair?

I think this is a leak in my game. For instance I am looking at 44. Someone raises small pf, I and one or two others call. Flop is rags like 872 rainbow. Having put the others on two high cards, I open the betting and get called. Invariably, I lose because someone has 66 or played w/ A7. If no one raised pf, the results are the same.

Should I quit betting at these pots or is there a more refined way to bet at these pots with these hands?