OK, it would be better (imho) to use the join node in manual mode to create a key/value object using msg.topic as the key (and set different topics for each sensor) and set it to send after two inputs and then on any change… that will then produce a message whenever either sensor sends an input, containing the most recent two values in two properties referenced by their topics. eg {temperature: 25, lux:50}
Then construct your query to save to the database using those two properties - for example in the manner recently posted in another thread - MsgPayload into a query on nodered-sqlite (though other methods are perfectly valid)