Ok I give in, I've spent far too long looking at pictures and datasheets of M12 connectors and haven't seen anything like this one. Weird thing about is that it's female yet has a threaded body. Obviously I need to find the matching plug, but if anybody can ID the manufacturer/family then that would be a massive step forwards...
Bloody Keyence, always wanting to sell you 400 euro cables by using oddball connectors!