Order in UPDATE
- changed call DBAPI->query("UPDATE") to DBAPI->update()
- removed unnecessary check after the call DBAPI->update()
  DBAPI->update() in case of error is always an exception and code will be able to continue
- used result DBAPI->insert() instead call DBAPI->getInsertId()