'Task is locked by the running workflow and cannot be edited'
A cause of this error appearing inconsistently is multiple users responding to tasks in parallel at the same time. In this scenario, one task will complete correctly and the other will not process. When the user tries again, the ‘task locked’ message will display.
In this case, the workflow is locked. In general, it's hard to find a real reason, and if circumstances permit, I suggest you change a complex workflow into several different workflows.
In addition, According to the ULS log you provide. Please check if the Due Date of the task is in the past instead of the future first.
If yes, please modify it to the future and then test.
You can also try to unregister and register the Workflow Proxy. Follow steps to unregister and register the Workflow Proxy:
- Go to Central Admin > Manage Service Application > Click on the Workflow Service Application Proxy.
- Select it and from the Ribbon click Delete.
- Run Register-SPWorkflowService in the PowerShell window. Would recommend using the –Force parameter.