I had considered that. Because you can use that command with Oreo. So it's possible that the device activated and thought it heard that.
Also, regarding the security concerns... It should only unlock if it's your voice. But you can also disable that in the settings.
On my pixel it's under settings>security>smart lock>trusted voice
In there, there's a slider to allow or not using "ok Google" to unlock your device. The menus may be different on your LG but the setting is probably there somewhere