Both the LTP (last traded price) and closing price during the last trading hours are different from one another. The LTP is the actual last traded price, whereas the closing price is the weighted average price of the last 30 minutes of the trading day. The settlement price and closing price are the same for liquid contracts.
The settlement price is updated in the place of the last traded price once the Bhav Copy, i.e., the daily report consisting the traded value, OHLC data, quantity, OI, etc is received from the NSE. The report comes in between 6:30 am and 7 am the next morning. It’s because of this reason that the LTP changes for F&O contracts to a settlement price.
In the case of illiquid contracts, if the trades have not happened in the last 30 minutes, then the exchange will offer a theoretical settlement price which will be reflected in the place of LTP.