UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0eUmmr70xTXrdhpjuled7Ny4HgIqv/0E9k1z3z4PsJg=' 
WHERE 
  key_id = '356c45f37066504af526d8d11d195b87c59331b75b83ed186f99844d49e1673f' 
  AND (
    token = '0eUmmr70xTXrdhpjuled7Ny4HgIqv/0E9k1z3z4PsJg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033