First, some conferences have really strict timing and you will be given no extra time.
Second, if there is important slide or two, just do it. But make sure that you only slightly extend your time (e.g. 10%). If you are going to extend it by 50%, or 200% (I saw that, and I was pissed at both the speaker and even more - the chair for allowing that) - please, don't.
Side note: as a chair I am an ass. And while I give something like 1 min grace time (for 15 min talks), then after that:
speaker: "But there is an important slide afterwards!"
me: "But not as important as other participants' time."
EDIT: By all means I recommend rehearsing and finishing on, or before, time. I only answer the question - whether to use extra 40 sec for 2 unfinished slides or not. "You should prepare to avoid such situation" is as on-topic as "you should go fishing instead of attending a conference".
(If the question is "Given X, should I do A or B?" all legitimate answers should assume "X", even if it is a suboptimal/nasty/unprofessional/embarrassing situation.)