The spot rate and the futures price will get closer together as it gets nearer to the end of the future.
Therefore if the current spot rate is higher than the current futures price then you add the unexpired basis to the current futures price, whereas if the current spot rate is lower than the current futures price you subtract the unexpired basis from the current futures price.