You're essential asking, "What's the optimal play with a medeocre hand in poor position." The optimal play is to not have a medeocre hand in poor position. If you're going to play it, raise it up and see if you can BUY position. If you get the people behind you to fold and the BB and limpers in front to call, then you have position for this hand. That's one option. The other is to fold.

When you have a smooth call behind you then you have to Guess. Do you have the best hand or not? If you don't then nothing you do will buy you the pot from AK with top pair. If you think you do, then play like you do. That's all you can do. But there's no way to Know if you're outkicked. I don't know if this help, and hell I could be wrong. But as a TAGGY, I know I love people who play KJ against my AK.