add lock|unlock to preg_match function within query function for mysqli/mysql

hi justin,

i hope this is ok, i've never contributed to someone else's project. i've used your class for nearly 10 years now - thank you!