My iPhone 4 doesn't lock automaticaly anymore. It seems that it is since iOS 6 update.
Is it a known bug? someone has noticed this problem? or is there a parameter or something that might be the cause of the problem?
I ran into a similar situation with an iPad running iOS 6. Powering it down, then back on again fixed it. Hard to say for sure if we had the same issue, but it's worth a try. Toggling the Auto-Lock setting might also be worth a try.