Marinate chicken in lemon juice, salt, pepper, garlic, vinegar and thyme. Marinate at least 3 hours, preferably over night. In large sauce pan, melt butter, then add sugar. When bubbling, add chicken (discard marinade) and brown. Meanwhile in small skillet heat some oil. Saute cashews, mushrooms, onions nad ginger. Add water, and pour mixture into large saucepan over chicken. Cook 25 minutes. Mix the flour with water, pour into chicken mixture, cook 3 mintues to thicken. Serve over rice.