plan b situation

Does anyone know if you take plan b and a few days later, you have unprotected sex does the plan b still work? How long does it stay in your system?