255 35 19s are 26.03 in diameter, 225 40 19s are 26.09. Difference due to rim width (if you put the same size tires on) is negligible, since these are real close to start with.Stock tires are Pilot Sport 4S, 225/40/19 on front, 255/35/19 rear. Looks like 19x8 front, 19x8.5 rear.
So yes, 225 40 19s should work fine.
If you are using a 45, then the tires will be about 3.5% bigger. It's not the end of the world. It will affect the speedo some. It *probably* wouldn't rub, it's about .45" increased radius. That isn't much, but that's where you may want to check clearance, lock-to-lock, up and down. Up and down is the harder one, but I have to imagine there is enough clearance in the wheel well. If you can find wheel travel, you should be able to measure it above the tire (with the tires all the way left or right). This is how you'd be sure....or you can just eyeball it.