diff --git a/sequelize/migrations/flow_node_instance/4.2.0-4.3.0-flow_node_instances.js b/sequelize/migrations/flow_node_instance/4.2.0-4.3.0-flow_node_instances.js
index <HASH>..<HASH> 100644
--- a/sequelize/migrations/flow_node_instance/4.2.0-4.3.0-flow_node_instances.js
+++ b/sequelize/migrations/flow_node_instance/4.2.0-4.3.0-flow_node_instances.js
@@ -86,7 +86,7 @@ module.exports = {
     logger.info('Updating existing foreign key data');
     for (const processToken of processTokens) {
       const flowNodeInstanceIdQueryResult =
-        await queryInterface.sequelize.query(`SELECT flowNodeInstanceId FROM FlowNodeInstances WHERE id = '${processToken.id}'`);
+        await queryInterface.sequelize.query(`SELECT flowNodeInstanceId FROM FlowNodeInstances WHERE id = '${processToken.flowNodeInstanceForeignKey}'`);
 
       const flowNodeInstanceId = flowNodeInstanceIdQueryResult[0][0].flowNodeInstanceId;
:bug: Fix reference error in flow node instance migration script