Obtains manual db/mysql locks