Does Touch ID work differently between Apple Pay and iPhone unlock? I'm only asking this out of curiosity. I've noticed that when I use my Touch ID to pay with iPhone, or to unlock an app, it's much quicker and it always works. However, while unlocking the iPhone, sometimes I need to put my thumb 2 or 3 times till  it unlocks. I noticed this happening with different iPhone models too.

Is there any explanation for this? May I just be wrong?
No. You may experience slower response times due to presence of moisture or dust on or under Touch ID sensor or finger/thumb respectively.

Cleaning/Drying the Touch ID sensor/finger usually resolves the lag issue.

iPhone 6s and later (excluding iPhone SE and all Touch ID equipped models of iPad) have a second generation Touch ID sensor which is much faster at recognizing finger/thumb geometry.