I agree with those above who state meet at the bank. I would take it one step further.
When I sold my 325Ci, I went with the buyer to his bank, where he took out cash and handed it to me in exchange for the title. This was per my suggestion when he said he'd give me a cashiers check. This way, no cashiers check was needed.
If buyer has the cash, ask him to call bank ahead of time (if it's a large sum, over $10k or so) to let them know he will be withdrawing $x amount on the agreed upon day (some banks may not have or be willing to dispense $40k without advance notice as a policy), and get him to withdraw the cash and hand it to you right there for the title. No need to deal with a cashiers check, and you know the money is real
If you meet at your bank, and they deposit the cashiers check, it can still come back as fake, and you would be liable for that sum to your bank. Also if you meet at his bank and watch him get the cashiers check, it's possible he can do a stop payment on the cashiers check after the fact.
I know you say in your situation this is not a complete stranger, so it might be overkill in this scenario, but as a general rule, I would deal with cash, meet at buyer's bank, get cash, hand title over, done deal.