I hate to be that guy, but hasn't this idea been around for a while, but using the bluetooth on your phone? Aside from using Bluetooth 4 (LE), what would the advantages be to this?
I'd also caution against marketing this as a "Mac lock"... I at first thought it was going to be an alarm for the physical device, not the OS.