I am creating the standalone task but I am not able to find a way to attach the formKey with it and Is there a possibility to update the form key of the existing task (Standalone and ProcessCreated Task)
You can get a task instance via the TaskService and then update the form key with setFormKey. Then use the saveTask method on TaskService to update the task instance.
Yes actually I was using Activiti5.15 version and In this version Task instance doesn't contain the setFormKey function so now I have updated my Activiti to 5.16 and able to save the form key as you suggested above