You should check all 1/4 inch black rubber vacuum hoses around the airbox. Make sure they are all plugged in at the right nipples and not cracked/broken.

The MAF may be clean and pass electrical test but is still defective. Swap in a known good MAF from another car. All Toyotas and Lexus use the same DENSO MAF. You can buy these electronic parts direct from DENSO.COM/PART about 1/3 prices in dealers.

Could also be a dirty fuel injectors or Air Filter and dirty throttle body that would make idle erratic. Clean them out.

Could also be low or uneven compression in cylinders. Flush engine with Motor Medic GUNK ($5 Walmart). It would clean any varnish on valves' seats and pistons' rings, improving compression..