Pledged shares cannot be sold without unpledging them. So the quantity sold will be the 50 shares you hold, which aren’t pledged. But the average price will be updated on a FIFO basis. Please check out this post for more info: Sell a pledged scrip - #4 by Nakul