I'm late, sorry.
Android only updates widgets when they're enabled, so you don't have to worry about that.
I think you can't know when a Widget is visible because the main idea behind them is to be ever enabled, ever ready to be watched by the user. That's why there's no callback for what you're asking.
You should update your widgets from a Service or from the method onUpdate() from the class that extends AppWidgetProvider. Last option is not encouraged because is Android who decides when to update your widget, no matter how much time you have set up on updatePeriodMillis.
Lockscreen widgets are available since API 17 to 19. Lollipop (API 21) no longer leaves you to add widgets to the lockscreen.
There's no direct callback neither.
Final words: You should design the widgets thinking that they have to be ever updated, no matter if they are visible or not because they could be visible in any moment.