The computer will handle it, anything after you reach the status level in the system will be updated wth the bonus. It may not happen before you get on the return flight, so when you check in they may not know you just reached status, it all depends on how long it takes to post the first trip.
Some airlines do not adjust any reservations going forward unless you ask, so if you have flights booked next month, but reach status this month, the records may not show your status, they have to open and save the record again for it to be updated. Once the miles post then anything in the future will be correct.