anything that is available in cprid is also available using the "run script" Management API command.
run script command: Check Point - Management API reference
So either using the mgmt_cli executable on the Management server, or from the command-line inside SmartConsole GUI, or using REST calls with your favorite scripting language, should be something like:
run-script script-name "changing expert password" script "set expert password-hash NEW_HASH
" targets.1 "corporate-gateway" targets.2 "branchOfficeGW"
Please note that run-script returns a task, and that task should be polled to see whether it succeeded or failed using the show tasks command: Check Point - Management API reference