I haven't tried this one myself yet since I don't see it as practical for my own use, but I can see it being great in an office environment or when you take your MacBook out into a public space.
macaway.app
MacAway: your Mac locks when you walk away
MacAway is a menu bar app that locks your Mac when you step away, and can unlock it when you come back. It follows a device you already carry over Bluetooth. No account, no server, nothing to install on your phone.