If you want both Test Steps to execute at the same time, why a need for a wait / delay between them? Not fully understanding the logic of what you are trying to do.
For reading and writing to the database, you could use the following steps (instead of groovy)
Data Sink Test Step - to write to a Database
JDBC Request - Read Data a Database and validate the data.
Can potentially help more but would need some more clarity on what it is you are trying to acheive
I'm also a little unsure if I understand fully, but if the goal with test step 1 is to connect to a database and keep that connection open then you should be able to do this with a DataSource - Data Connection test step. The Data Connection data type will keep the connection to your database open allowing you to reference that database throughout your test case.
Check out the page on the Data Connection Data Source and see if this is relevant to what you're trying to do. https://support.smartbear.com/readyapi/docs/testing/data-driven/types/connection.html