Executing scripts from the command line has been discussed in several threads here, you can easily find them if you need more information.
To done your work, do the following:
Choose Tools - Macros - Organize Macros - LibreOffice Basic, click the Organizer button.
In the My Macros & Dialogs section, create a new library, name it, for example, updateRefs.
Go to edit (upper right button) and rename the created Module1 to UpdateHidden
Paste the following code into the module:
Sub updateAndSave(sSourcePath As String)
Dim sPath As String
Dim oDoc As Variant
Dim loadComponentProperties(0) As New com.sun.star.beans.PropertyValue
Rem Prevent screen flashing - perform file upload in "stealth mode"
Rem We can load the spreadsheet using loadComponentFromURL().
Rem But the OpenDocument() from the Tools library does it better.
Rem Therefore, we load the Tools library:
Rem Convert the full path to the file, received in the parameter,
Rem into the correct URL:
sPath = ConvertToURL(sSourcePath)
Rem If a file with that name exists (and it may not exist):
If FileExists(sPath) Then
Rem Open spreadsheet:
oDoc = OpenDocument(sPath,loadComponentProperties)
Rem Recalculate all formulas (and update external links at the same time)
Rem and close
(Of course, you can delete the comments, I inserted them to explain what exactly the script should do)
Now if you execute
"C:\Program Files\LibreOffice\program\soffice.exe" --headless --nologo "macro:///UpdateRefs.UpdateHidden.updateAndSave(C:\TEMP\myTestFile.ods)
from the command line you will get the desired result.