FIX chain update query if it was not present in db previously