You can exit your SLB position before contract expiry through repay (for borrowers) or recall (for lenders) mechanisms.
Repay (for borrowers)
When you want to return borrowed shares, you can return them to the exchange without waiting for the settlement period to end. The exchange will reverse your margin amount on the same day you return the shares.
Recall (for lenders)
When you want your lent shares back before contract expiry, you can recall them by placing a recall order in the same series in which you lent them. However, this isn't guaranteed as it depends on the price and open orders available.
If you need your shares back urgently, you can recall them at the market rate.
To check live quotes and place orders, see How to check live quotes and place orders for SLB?