Update locked properties of a file

up:: PowerAutomate

if
  (
    and
    (
      equals(outputs('Update_file_properties')?['body']?['status'],400), 
      contains(outputs('Update_file_properties')?['body']?['message'], 'locked')
    )
    ,true
    ,false
  )
  //inside Compose:
  setProperty(body('Parse_JSON_-_is_file_locked'),body('Parse_JSON_-_is_file_locked')?['IsLocked'],if(equals(outputs('Update_file_properties')?['body']?['status'],400), true, false))
  //Delay in seconds:
  if(body('Parse_JSON_-_is_file_locked')?['IsLocked'],90,1)

related:
Document is locked for shared use by user
Power Automate: Error 400 - file locked for shared use
Add & Update Excel Data to SharePoint List using Power Automate | Excel Import using flow