there is no single command that will get you out of king's chains. depending on which exact part of the chain throw, the escape command is different. however, not many king players know exactly which button(s) would escape which chain throw command, so about half the time, if you start mashing LP or RP, you'll escape just by chance.
Most all throws in the game can be escaped or reversed with LP, RP, or LP+RP. only one or two throws are reversed with kicks (King's figure four is reversed with LK+RK).
as for the timing of the escape command, it's basically within the first 5 frames of whatever throw animation is going on.