select order_id
from ec_orders
where user_session_id=:user_session_id
and order_state='in_basket'
select gift_certificate_id
from ec_gift_certificates
where claim_check=:claim_check
select user_id as gift_certificate_user_id, amount
from ec_gift_certificates
where gift_certificate_id=:gift_certificate_id