UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CDo8yH9NrBipX1YaPMWRRv1NL75sd1CgrF8ByVm0sQM=' 
WHERE 
  key_id = '42528714faf8aa49644065aec02f02cbd4a7810a6cf76b4636b64a0bf572302f' 
  AND (
    token = 'CDo8yH9NrBipX1YaPMWRRv1NL75sd1CgrF8ByVm0sQM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041