You played that hand well (although it could be argued that you should have raised all in immediately instead of a smaller reraise). Lets look at why. You have two different situations to act so we'll deal with both seperately.
Situation 1:
Preflop: Hero is MP3 with K, A.
UTG1 folds, UTG2 raises to $0.20, MP1 calls $0.20, MP2 folds, Hero...
Here is your first decision lets look at the options:
1) Fold.
This is simply too weak a play with AK. If you fold AK here then you are missing an excellence spot to make money and are probably too risk-averse to even consider playing poker.
2) Call.
A call is a reasonable option however a call does not give the opponents a chance to fold. It also means that you only get to see 3 cards. If you do not hit an ace or king you will have to fold your hand.
3) Raise.
A raise (either all in immediately or 3 times previous raise) is heading towards being all in. It gains both fold equity and allows you to see all 5 cards.
Consider the benefit of being all in that you will hit an ace or king 50% of the time compared to 30% of the time if you only see the flop.
Conclusion:
Raising gives us the highest expectation because we get fold equity and higher equity if we are called.
Situation 2:
Preflop: Hero is MP3 with K, A.
UTG1 folds, UTG2 raises to $0.20, MP1 calls $0.20, MP2 folds, Hero raises to $0.60, 4 folds, UTG2 raises to $3.00, MP1 folds, Hero...
Here we only have two options: Call or Fold.
If we call we have to pay $0.97 to have a chance to win a $4.92 pot. This means to call we need to have roughly a 20% chance to win. ($0.97/$4.92)
If you use the equilator you can see that against any range (players will raise more than just aces here) you have more than 20% equity.
Hope that clears it up.