is there any way to export and import nodes programmatically...? While import if the node already exists then it should be updated without creating a new node.
Try the Node Export module
This module allows users to export nodes and then import it into another Drupal installation, or on the same site.
Using this module you can save yourself a lot of time setting up new websites that have similar nodes to websites you've already made, migrating nodes to new Drupal versions, or between development/staging/production sites.
You will need the same content types for the imports to work (unless using Feeds to import), and ideally relevant compatibility with fields, and modules