Here is the setup I use (requires AutoInput).
Profile: Update Apps
Time: 2:00AM
Enter: Update Apps
A1: AutoInput Screen Off/On
Screen Off Or On: Turn On
Timeout (Seconds): 60
A2: Wait
MS: 0
Seconds: 4
Minutes: 0
Hours: 0
Days: 0
A3: AutoInput UI Query
Check Screen State: true
Timeout (Seconds): 20
A4: If %aiscreenunlocked eq unlocked
A5: Send Intent
Action: com.google.android.finsky.VIEW_MY_DOWNLOADS
Cat: Default
Package: com.android.vending
Class: com.google.android.finsky.activities.MainActivity
Target: Activity
A6: AutoInput UI Query
App Package: com.android.vending
Text: (No\s)?(U|u)pdates\savailable(\s\(\d+\))?
Regex: true
Variables: update
Timeout (Seconds): 20
A7: AutoInput Action
Type: Text
Value: UPDATE ALL
Action : Click
Timeout (Seconds): 120
If %update eq UPDATE ALL
A8: Wait
MS: 0
Seconds: 1
Minutes: 0
Hours: 0
Days: 0
A9: AutoInput Global Action
Action: Back
Timeout (Seconds): 20
A10: Wait
MS: 0
Seconds: 1
Minutes: 0
Hours: 0
Days: 0
A11: Else
A12: Notify
Title: Update Apps Error
Text: Screen was locked
Icon: null
Number: 0
Permanent: Off
Priority: 3
A13: End If
A14: AutoInput Screen Off/On
Screen Off Or On: Turn Off
Timeout (Seconds): 60