UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Tgwn3PtKElwicBtO2Ou24J7/d7XGmyHKFq3S7mvhaDQ=' 
WHERE 
  key_id = 'da1cc2a44af22962ae775c65c758c3ceb37f7ad22f8806b93deb65469c393f19' 
  AND (
    token = 'Tgwn3PtKElwicBtO2Ou24J7/d7XGmyHKFq3S7mvhaDQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017