Device Session Storage - Wrong Payload Decryption

I have a general question regarding the device session storage:
Where are the session parameters (AppSKey, NwkSKey,…) stored after a successfull Join?

I had a some problems with my postgres DB. After getting it to work again, some of the devices send wrong decrypted data. So my guess is that the device session keys where somehow wrong.
After a new Join the devices worked again as expected, but shouldn’t there be a MIC error in case the device session is wrong?