UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EH+btnK1i5ylmmmZei7UNF+rnRnRL1j0KF4R5f+qhow=' 
WHERE 
  key_id = 'dd264d655f3a2ee7e273758c0bf34feed9ebbb02f3a9ab1e348cc81a156dbfc7' 
  AND (
    token = 'EH+btnK1i5ylmmmZei7UNF+rnRnRL1j0KF4R5f+qhow=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037