Remove possibility of setting region and system id at same time

Setting region and system id to a value greater then zero results in
wrong http queries. If one value is sucesseful set, reset the other.
Replace query with working one

Original query does not work as expected. Replace this generated query
with a sql statement as more knowledge about Typo3 queries exists.