Certainly, ads on lock screen work lot better. I have worked on this exact similar kind of ad format. But speaking strictly in terms of UX, here is how this could be thought out:
1) When wanting to use the phone for a specific purpose, the lock screen is always an additional overhead for the user, but since its helping (security), its taken as helpful. Now wrt, ads on lock screen, unless the ad is very targeted and something useful to the user (delight wise or information/utility wise), its just annoying. Very annoying as its very close to his/her personal space.
2) Ads not on lock screen are certainly one level up in terms of a possibility of more user annoyance. Imagine, a simple example - of user wanting to read an sms - 1) See the ad 2) Annoyed, and just wanting to unlock the device, user closes the ad 3) Unlocks the phone, 4) Reads the sms. Step 2) can really be a real pain, in most cases.
3) Since as Devin pointed, to serve such ads, the SDK/functionality is baked into the device level - and hence annoyance could very well - being bad name to the brand (although there has to be a way to switch such ads off). Just the fact that the brand allows it, is considered bad.
4) Thought should be towards making these lock screen ads - helpful to the user. Some examples I can recall we experimented were, location based ads (example, a discount coupon when you are in a specific shopping area) OR weather based ads (hot coffee coupon on a rainy day) etc. Any just promoting the ad brand, brand video etc on that screen is not advised.