Changed query lock