Ex-president of South Korea jailed 30 years