From Jenkins side, the solution is to have different repo dirs in your workspace for each checkout, that way you won't run into the same locked project twice. You can do this in multiple ways, it just depends on how many concurrent builds do you expect at the same time.
Assuming you're using Git, you can add this in the extensions section in your checkout command to have each build checked out in its own directory, based on its build number, and under one workspace directory (ie. your pipeline directory).
[$class: 'RelativeTargetDirectory', relativeTargetDir: "${BUILD_NUMBER}" ]
You have two choices to clean up, either use the "Wipe out repository & force clone" from the checkout command or the Workspace Cleanup Plugin.
Keep in mind that the checkout wipe command will delete everything under the directory you are about to do your next checkout in, meaning it will keep the rest of you workspace intact and won't work if you used the build number like the example above. Here is what you need to add to your extensions section:
[$class: 'WipeWorkspace']
The cleanWS plugin gives you greater flexibility since you are able to specify patterns for what you want to include, or exclude if you change the type:
cleanWs(patterns: [[pattern: '', type: 'INCLUDE']])
I hope this helps.