South Korean court reduces prison sentence for ex-prime minister in martial law case