Once you square-off the buy position, your sell position will no more be hedged and will require full SPAN + Exposure margin.
Yes, you will be able to square-off your position.
Though will advise you not to square-off the buy position first and leave short position open, as if you don’t have sufficient margins in your account, this will lead to peak margin penalty.
Ideally you should square-off the short position first and then the buy option position. Would suggest you go through this post for more details: Peak margin, Intraday leverages, & 2nd order effects - Dec 1st 2020