This happened to me too. The sd card message kept popping up and my phone was indicating it restarted. It wasn't doing a full restart, though, because I never saw the Samsung/Verizon boot-up screens. It was like the phone was "pretending" to restart. The lock screen would also lag when this happened. And, it was killing my battery because the phone kept looking for the sd card and (I assume) attempting to restart. Not sure about that.
Anyway, the problem was a flashlight app that I carried over from my Note 4. Anyway, try putting the phone in safe mode. If the problem doesn't happen in safe mode, then you know it's a third-party app causing it. From there, you just have to keep uninstalling apps you may think is causing the problem until you find which one it is. It's a major P.I.T.A. but you'll eventually find the app causing it. Keep a list of everything you uninstall.
The flashlight app I was using had a widget that displayed on the lock screen. That may have had something to do with it. I can't remember the name of the flashlight app, unfortunately. Good luck.
Anyway, the problem was a flashlight app that I carried over from my Note 4. Anyway, try putting the phone in safe mode. If the problem doesn't happen in safe mode, then you know it's a third-party app causing it. From there, you just have to keep uninstalling apps you may think is causing the problem until you find which one it is. It's a major P.I.T.A. but you'll eventually find the app causing it. Keep a list of everything you uninstall.
The flashlight app I was using had a widget that displayed on the lock screen. That may have had something to do with it. I can't remember the name of the flashlight app, unfortunately. Good luck.