UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fPHv8HjH3JmIgOAasOiX9UzsVSKZUBp53Zipv69JLzI=' 
WHERE 
  key_id = 'fce2c38bb35f84446d757c2e240ad9a4ce148237f9efac2bbdb9268d25a16cd3' 
  AND (
    token = 'fPHv8HjH3JmIgOAasOiX9UzsVSKZUBp53Zipv69JLzI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048