Can a Police or Army Officer obey unlawful order of Superior officer to kill in order to suppress riot?

Where a riot or mutiny will result to serious mischief and destruction of lives and properties, any person acting under the orders of the armed or police forces can obey the lawful command of a superior officer in a relation to the suppression of a riot or mutiny and if willful death occurs here, it is permitted. We advise that you stay out of trouble and don’t be a threat to public peace and order.

But if the junior officer acts in pursuant of an unlawful order, he would be liable.