Put below code in your android app where you want to turn off the screen lock sound.
If you using Activity use below code :
Settings.System.putInt(getContentResolver(), "lockscreen_sounds_enabled",
0);
If you using Fragment use below code :
Settings.System.putInt(getActivity(),getContentResolver(), "lockscreen_sounds_enabled",
0);
To enable it again you can set 1 instead of 0.
Thanks